ALL:	build

rebuild: clean build delexe

clean:
	@find . -name '*.hi' -exec rm '{}' ';'
	@find . -name '*.o' -exec rm '{}' ';'

build:	TestWSDL MakeGraph SAPHelpTools Hixay WS/ProxyGenerator/ProxyGenerator

WS/ProxyGenerator/ProxyGenerator:	WS/ProxyGenerator/ProxyGenerator.hs
	@ghc --make WS/ProxyGenerator/ProxyGenerator.hs

Hixay:	Hixay.hs
	@ghc --make Hixay.hs

MakeGraph:	MakeGraph.hs HixayGraph.hs 
	@ghc --make MakeGraph.hs

TestWSDL:	TestWSDL.hs HixayGraph.hs 
	@ghc --make TestWSDL.hs

SAPHelpTools:	SAPHelpTools.hs
	@ghc --make SAPHelpTools.hs

script_everything.dot script_scenario.dot:	TestWSDL.par HixayGraph.hs
	./TestWSDL +RTS -s 

script3.dot:	MakeGraph.hs MakeGraph
	./MakeGraph
	
script3.png:	script3.dot
	@dot -Tpng -oscript3.png script3.dot
	
script_everything.png:	script_everything.dot
	@dot -Tpng -oscript_everything.png script_everything.dot 

script_scenario.png:	script_scenario.dot
	@dot -Tpng -oscript_scenario.png script_scenario.dot 

delexe:
	@rm Hixay TestWSDL MakeGraph SAPHelpTools

cabal:
	runhaskell Setup.hs configure --ghc
	runhaskell Setup.hs build
	runhaskell Setup.hs sdist
	tar tzf dist/hixay-*.tar.gz

